<br>
<div class="container">
    <div class="row row-offcanvas row-offcanvas-right">
        <div class="col-xs-6 col-sm-3 sidebar-offcanvas">
            <div class="panel-body">{{$server := .server}}{{$envData := .envData}}{{$dirData := .dirData}}
                <div class="row">
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong>安装步骤</strong></div>
                        <div class="list-group">
                            <a href="/install/license" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 1. 许可协议</a>
                            <a href="/install/env" class="list-group-item active"><i class="glyphicon glyphicon-hand-right"></i> 2. 环境检测</a>
                            <a href="/install/config" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 3. 系统配置</a>
                            <a href="/install/database" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 4. 数据库配置</a>
                            <a href="/install/ready" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 5. 准备安装</a>
                            <a href="#" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 6. 安装完成</a>
                        </div>
                        <div class="panel-footer">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12 col-sm-9">
            <div class="panel-body">
                <!-- 服务器信息 -->
                <div class="row">
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong><i class="fa fa-server"></i> 服务器信息</strong></div>
                        <div class="panel-body"></div>
                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th class="w13p">参数</th>
                                    <th>值</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td class="center">IP</td>
                                    <td class="center">{{$server.host}}</td>
                                </tr>
                                <tr>
                                    <td class="center">操作系统</td>
                                    <td class="center">{{$server.sys}}</td>
                                </tr>
                                <tr>
                                    <td class="center">MM-Wiki 版本</td>
                                    <td class="center">
                                    {{if eq $server.version ""}}
                                        <span class="text text-danger">Error：无法获取 MM-Wiki 版本号，请检查安装文件是否完整！</span>
                                    {{else}}
                                        <span class="text text-success">{{$server.version}}</span>
                                    {{end}}
                                    </td>
                                </tr>
                                <tr>
                                    <td class="center">安装目录</td>
                                    <td class="center">{{$server.install_dir}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="panel-footer">
                        </div>
                    </div>
                    <!-- 系统环境检测 -->
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong><i class="fa fa-check-circle"></i> 系统环境检测</strong></div>
                        <div class="panel-body"></div>
                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th class="w13p">参数</th>
                                    <th>要求（>=）</th>
                                    <th>值</th>
                                    <th class="w11p">结果</th>
                                </tr>
                                </thead>
                                <tbody>
                                {{range $env := $envData}}
                                <tr>
                                    <td class="center">{{$env.name}}</td>
                                    <td class="center">{{$env.require}}</td>
                                    <td class="center">{{$env.value}}</td>
                                    <td class="center">
                                        {{if eq $env.result "1"}}
                                        <i class="glyphicon glyphicon-ok text-success"></i>
                                        {{else}}
                                        <i class="glyphicon glyphicon-remove text-danger"></i>
                                        {{end}}
                                    </td>
                                </tr>
                                {{end}}
                                </tbody>
                            </table>
                        </div>
                        <div class="panel-footer">
                        </div>
                    </div>
                    <!-- 目录权限检测 -->
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong><i class="fa fa-folder-open"></i> 目录文件检测</strong></div>
                        <div class="panel-body"></div>
                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th class="w30p">目录或文件</th>
                                    <th>要求</th>
                                    <th class="w11p">结果</th>
                                </tr>
                                </thead>
                                <tbody>
                                {{range $dir := $dirData}}
                                <tr>
                                    <td>{{$dir.path}}</td>
                                    <td class="center">{{$dir.require}}</td>
                                    <td class="center">
                                        {{if eq $dir.result "1"}}
                                        <i class="glyphicon glyphicon-ok text-success"></i>
                                        {{else}}
                                        <i class="glyphicon glyphicon-remove text-danger"></i>
                                        {{end}}
                                    </td>
                                </tr>
                                {{end}}
                                </tbody>
                            </table>
                        </div>
                        <div class="panel-footer"></div>
                    </div>
                    <!-- 按钮 -->
                    <form action="/install/env" method="post">
                        <div class="col-md-offset-8 pull-right">
                            <a href="/install/license">
                                <button type="button" class="btn btn-warning">上一步</button>
                            </a>
                            <button type="button" onclick="Install.Submit(this.form, $(this))" class="btn btn-primary">下一步
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <hr>
    <footer>
        <p>© {{.copyright}}</p>
    </footer>
</div>